/**
 *  会员模块接口
 * **/

import request from '@/common/request.js'
import {HTTP_REQUEST_URL,HTTP_REQUEST_URL_2} from '@/config.js'

const user_api={}

// 获取token
user_api.getToken = data => request.globalRequest({
	methods: 'POST',
	url: 'https://shibie.honghuoyi.com/user/token.do',   
	data: data   
})

// 获取版本信息
user_api.getVersion = data => request.globalRequest({
	methods: 'POST',
	url: 'http://www.honghuoyi.com/plus/hhyapp.php',   // http://www.honghuoyi.com/plus/hhyapp.php?act=ceshipag
	data: data, 
}) 

// 获取版本信息 测试
user_api.getVersion = data => request.globalRequest({
	methods: 'POST',
	url: 'http://www.honghuoyi.com/plus/hhyapp.php',   
	data: data, 
}) 

// 获取版本更新日志
user_api.getVersionLog = data => request.globalRequest({
	methods: 'POST',
	url: 'http://www.honghuoyi.com/plus/hhyapp.php?act=packagelist',   
	data: data, 
}) 



// 登录
user_api.login = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/login',   
	data: data, 
}) 

// 登录
user_api.checkLogin = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/checklogin',   
	data: data   
}) 

 

// 发送验证码  type 空/0 登录   1 找回密码  2 重置密码  
user_api.sendsms = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/sendsms',   
	data: data   
})


// 检测验证码
user_api.checksms = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/checksms',   
	data: data   
})

// 设置信息
user_api.updatePwd = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/update-pwd',   
	data: data   
})


// 退出登录
user_api.logout = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/logout',   
	data: data   
})

// 保存cookie
user_api.saveCookie = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/save-cookie',   
	data: data   
})

// 获取用户信息
user_api.getUserInfo = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/user-info',   
	data: data   
})

// 获取用户信息
user_api.getMyMemberList = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/user/members',   
	data: data   
})

// 添加我的项目
user_api.addMyMember = data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/project/add-project',   
	data: data    
})

// 保存地区信息 
user_api.setUserInfo = data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/ydc/setuserinfo',   
	data: data   
})

// 获取地区信息 
user_api.getUserAddressInfo = data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/yun/address-info',   
	data: data   
})

// 获取用户权限
user_api.getUserOperationAuth = data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/user/user-operation-auth',   
	data: data   
})

// 消息推送 发送cid
user_api.sendCid = data => request.globalRequest({
	methods: 'post', 
	url: HTTP_REQUEST_URL_2+'/plus/hhyapp.php?act=addcid',   
	data: data   
})

// 修改名称
user_api.updateName = data => request.globalRequest({
	methods: 'post', 
	url: HTTP_REQUEST_URL+'/user/update-pwd',   
	data: data   
})

// 是否有红包检测
user_api.checkRedPacket = data => request.globalRequest({
	methods: 'post', 
	url: HTTP_REQUEST_URL+'/yfk/has-redpack',   
	data: data   
})

// 绑定账号
user_api.bindPhone= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/user/yfkbd',   
	data: data   
})

// 注销账号
user_api.cancleAccount= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/user/cancel',   
	data: data   
})

// 意见反馈
user_api.saveFeedBack= data => request.globalRequest({
	methods: 'POST', 
	url: HTTP_REQUEST_URL+'/user/save-idea',   
	data: data   
})
 



export default user_api






